import type { EChartOption } from 'echarts'
export const lineOptions: EChartOption = {
  title: {
    text: '收益趋势',
    left: 'center'
  },
  xAxis: {
    data: [],
    boundaryGap: false,
    axisTick: {
      show: false
    }
  },
  grid: {
    left: 20,
    right: 20,
    bottom: 20,
    top: 40,
    containLabel: true
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross'
    },
    padding: [5, 10]
  },
  yAxis: {
    axisTick: {
      show: false
    }
  },
  legend: {
    left: 'auto',
    icon: 'rect',
    data: ['本月', '上月']
  },
  series: [{
    name: '本月',
    itemStyle: {
      normal: {
        color: '#FF005A',
        lineStyle: {
          color: '#FF005A',
          width: 2
        }
      }
    },
    smooth: true,
    type: 'line',
    data: [],
    animationDuration: 2800,
    animationEasing: 'cubicInOut'
  },
  {
    name: '上月',
    smooth: true,
    type: 'line',
    itemStyle: {
      normal: {
        color: '#3888fa',
        lineStyle: {
          color: '#3888fa',
          width: 2
        },
        areaStyle: {
          color: '#f3f8ff'
        }
      }
    },
    data: [],
    animationDuration: 2800,
    animationEasing: 'quadraticOut'
  }]
}

export const barOptions: EChartOption = {
  title: {
    text: '订单趋势',
    left: 'center'
  },
  grid: {
    left: 20,
    right: 20,
    bottom: 20,
    top: 40,
    containLabel: true
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    }
  },
  xAxis: {
    type: 'category',
    data: [],
    axisTick: {
      alignWithLabel: true
    }
  },
  yAxis: {
    type: 'value'
  },
  legend: {
    left: 'auto',
    icon: 'rect',
    data: ['本月', '上月']
  },
  series: [{
    name: '本月',
    data: [],
    type: 'bar'
  }, {
    name: '上月',
    data: [],
    type: 'bar'
  }]
}
